package com.lanvideo.entity;

import java.time.LocalDateTime;

/**
 * 视频观看记录实体类
 */
public class VideoViewRecord {
    private Integer id;
    private Integer videoId;
    private Integer userId;
    private LocalDateTime viewTime;
    private Integer watchDuration; // 观看时长（秒）
    
    // 关联信息
    private String videoTitle;
    private String userName;

    public VideoViewRecord() {}

    public VideoViewRecord(Integer videoId, Integer userId) {
        this.videoId = videoId;
        this.userId = userId;
    }

    // Getters and Setters
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getVideoId() {
        return videoId;
    }

    public void setVideoId(Integer videoId) {
        this.videoId = videoId;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public LocalDateTime getViewTime() {
        return viewTime;
    }

    public void setViewTime(LocalDateTime viewTime) {
        this.viewTime = viewTime;
    }

    public Integer getWatchDuration() {
        return watchDuration;
    }

    public void setWatchDuration(Integer watchDuration) {
        this.watchDuration = watchDuration;
    }

    public String getVideoTitle() {
        return videoTitle;
    }

    public void setVideoTitle(String videoTitle) {
        this.videoTitle = videoTitle;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    @Override
    public String toString() {
        return "VideoViewRecord{" +
                "id=" + id +
                ", videoId=" + videoId +
                ", userId=" + userId +
                ", viewTime=" + viewTime +
                ", watchDuration=" + watchDuration +
                ", videoTitle='" + videoTitle + '\'' +
                ", userName='" + userName + '\'' +
                '}';
    }
}
